package com.sanjin.dubbo.transport;

/**
 * 在序列化的基础上封装socket读写通用操作，如处理半包/粘包
 *
 * @author: jiangxch
 * @date: 2021/2/16 下午8:10
 */
public interface Codec {
    
    /**
     * 编解码
     * @param channel
     * @param channelBuffer
     * @param message
     */
    void encode(Channel channel, ChannelBuffer channelBuffer, Object message);
    void decode(Channel channel, ChannelBuffer channelBuffer);
}
